package lib.bone.system.domain.dto.dept;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.Column;
import javax.validation.constraints.*;

@Data
@ApiModel(value = "部门数据更新DTO")
public class DeptUpdateDTO {
    @NotNull(message = "ID不可为空")
    @ApiModelProperty(value = "部门ID",name = "id")
    Long id;

    @ApiModelProperty("父部门ID")
    Long parentId;


    @NotBlank(message = "部门名称不可为空")
    @ApiModelProperty("部门名称")
    String deptName;

    /** 显示顺序 */
    @ApiModelProperty("显示顺序")
    private Integer orderNum;

    /** 负责人 */
    @NotBlank(message = "负责人姓名不可为空")
    @ApiModelProperty("负责人")
    private String leader;

    /** 联系电话 */
    @Pattern(regexp = "^[1][3,4,5,7,8][0-9]{9}$" , message = "电话号码有误")
    @ApiModelProperty("联系电话")
    private String phone;

    /** 邮箱 */
    @ApiModelProperty("负责人邮箱")
    private String email;

    @Min(0)
    @Max(1)
    @ApiModelProperty("部门状态")
    private Integer status;
}
